package com.ruoyi.system.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.BaseMapper.Query;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
/**
 * 学生信息对象 sys_student
 * 
 * @author chenjiuchang
 * @date 2025-10-16 16:10
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysStudent implements Serializable
{
    private static final long serialVersionUID = 1L;

     /** 编号 */
    @TableId(type = IdType.AUTO)
    private Long studentId;
     /** 学生名称 */
    @Excel(name = "学生名称")
    @Query(type = Query.Type.LIKE)
    private String studentName;
     /** 年龄 */
    @Excel(name = "年龄")
    @Query(type = Query.Type.EQ)
    private Integer studentAge;
     /** 爱好（0代码 1音乐 2电影） */
    @Excel(name = "爱好", readConverterExp = "0=代码,1=音乐,2=电影")
    @Query(type = Query.Type.EQ)
    private String studentHobby;
     /** 性别（0男 1女 2未知） */
    @Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
    @Query(type = Query.Type.EQ)
    private String studentSex;
     /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    @Query(type = Query.Type.EQ)
    private String studentStatus;
     /** 生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
    @Query(type = Query.Type.EQ)
    private Date studentBirthday;
     /** 所属班级ID */
    @Excel(name = "所属班级ID")
    @Query(type = Query.Type.EQ)
    private Long classId;

    /** 班级信息（关联查询字段） */
    @Query(joinEntity = SysClass.class,
            mainField = "classId",
            joinField = "classId",
            joinType = Query.JoinType.LEFT)
    @TableField(exist = false)
    private SysClass sysClass;

}